<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>align-items--设置侧轴上的子元素排列方式</title>
    <style>
        div{
            /* 设置弹性布局，行内元素即有宽高 */
            display: flex;
            width: 800px;
            height: 400px;
            background-color: pink;
            /* 主轴为侧轴 */
            flex-direction: column;
            justify-content: center;
            /* align-items:设置侧轴子元素的排列方式。从上到下 */
            /* align-items: flex-start; */
            /* 拉伸：子元素不设置高度 */
            /* align-items: stretch; */
            align-items: center;
        }
        div span{
            width: 150px;
            height: 100px;
            background-color: purple;
            color: #fff;
            margin: 10px;
        }
    </style>
</head>
<body>
    <div>
        <span>1</span><span>2</span><span>3</span><span>4</span><span>5</span>
    </div>
</body>
</html>